package com.mdc.mansion.dataaccess.modules.order.entity;

import com.mdc.mansion.dataaccess.common.persistence.BaseEntity;
import java.math.BigDecimal;
/**
 * 餐厅订单明细信息持久类
 * @author mingdongc
 * @version 2018-01-01
 */
public class RestaurantOrderItem extends BaseEntity<RestaurantOrderItem>{
	private static final long serialVersionUID = 1L;
    private String restaurantId;
    private String restaurantOrderId;
    private String orderSerialNum;
    private String restaurantDishesComboId;
    private String restaurantTableId;
    private String restaurantDishesId;
    private String restaurantStaffVerifyId;
    private String amount;
    private BigDecimal price;
    private BigDecimal discountPrice;
    private Integer urgentAmount;
    private Integer dishesStatus;
    private String restaurantDishesStandardId;
    private String restaurantDishesFlavorId;

    public String getRestaurantId(){
        return restaurantId;
    }

    public void setRestaurantId(String restaurantId){
        this.restaurantId=restaurantId;
    }

    public String getRestaurantOrderId(){
        return restaurantOrderId;
    }

    public void setRestaurantOrderId(String restaurantOrderId){
        this.restaurantOrderId=restaurantOrderId;
    }

    public String getOrderSerialNum(){
        return orderSerialNum;
    }

    public void setOrderSerialNum(String orderSerialNum){
        this.orderSerialNum=orderSerialNum;
    }

    public String getRestaurantDishesComboId(){
        return restaurantDishesComboId;
    }

    public void setRestaurantDishesComboId(String restaurantDishesComboId){
        this.restaurantDishesComboId=restaurantDishesComboId;
    }

    public String getRestaurantTableId(){
        return restaurantTableId;
    }

    public void setRestaurantTableId(String restaurantTableId){
        this.restaurantTableId=restaurantTableId;
    }

    public String getRestaurantDishesId(){
        return restaurantDishesId;
    }

    public void setRestaurantDishesId(String restaurantDishesId){
        this.restaurantDishesId=restaurantDishesId;
    }

    public String getRestaurantStaffVerifyId(){
        return restaurantStaffVerifyId;
    }

    public void setRestaurantStaffVerifyId(String restaurantStaffVerifyId){
        this.restaurantStaffVerifyId=restaurantStaffVerifyId;
    }

    public String getAmount() {
        return amount;
    }

//    public void setAmount(BigDecimal amount) {
//        this.amount = amount;
//    }
    
    public void setAmount(String amountStr) {
        BigDecimal bg = new BigDecimal(amountStr);
        if(new BigDecimal(bg.intValue()).compareTo(bg)==0){
            this.amount = String.valueOf(bg.intValue());
        }else{
            this.amount = amountStr;
        }
    }
    
    
    
    public BigDecimal getPrice(){
        return price;
    }

    public void setPrice(BigDecimal price){
        this.price=price;
    }

    public BigDecimal getDiscountPrice(){
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice){
        this.discountPrice=discountPrice;
    }

    public Integer getUrgentAmount(){
        return urgentAmount;
    }

    public void setUrgentAmount(Integer urgentAmount){
        this.urgentAmount=urgentAmount;
    }

    public Integer getDishesStatus(){
        return dishesStatus;
    }

    public void setDishesStatus(Integer dishesStatus){
        this.dishesStatus=dishesStatus;
    }

    public String getRestaurantDishesStandardId() {
        return restaurantDishesStandardId;
    }

    public void setRestaurantDishesStandardId(String restaurantDishesStandardId) {
        this.restaurantDishesStandardId = restaurantDishesStandardId;
    }

    public String getRestaurantDishesFlavorId() {
        return restaurantDishesFlavorId;
    }

    public void setRestaurantDishesFlavorId(String restaurantDishesFlavorId) {
        this.restaurantDishesFlavorId = restaurantDishesFlavorId;
    }

    public enum DISHES_STATUS{
        //'菜品状态0：待确认 1：已确认 2：制作中 3：完成 4：缺货 5：取消'
        TO_BE_CONFIRM("待确认",0),
        CONFIRMED("已确认",1),
        IN_DEVELOPMENT("制作中",2),
        COMPLETE ("完成",3),
        STOCK_OUT("缺货",4),
        CANCEL ("取消",5);
        private String name;
        private int val;

        DISHES_STATUS(String name, int val) {
            this.name = name;
            this.val = val;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getVal() {
            return val;
        }

        public void setVal(int val) {
            this.val = val;
        }
    }

}